<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common::common('新增字段')"/>
    <script th:src="@{/static/tools/way.js}" charset="utf-8"></script>
    <script th:src="@{/static/tools/column.js}" charset="utf-8"></script>
</head>
<body class="bg-color">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12" style="background-color: #FFF; margin-top: 15px">
            <div class="layui-card">
                <div class="layui-card-header">新增字段</div>
                <div class="layui-card-body" pad15>

                    <form class="layui-form" id="addAppClientForm">
                        <div class="layui-form-body">

                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>表字段
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" id="columnName" name="columnName"
                                               placeholder="例如: user_name"
                                               autocomplete="off" lay-verify="required" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>字段描述
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" id="columnComment" name="columnComment"
                                               placeholder="例如: 用户姓名"
                                               autocomplete="off" lay-verify="required" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>数据库类型
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" id="columnType" name="columnType"
                                               placeholder="例如: NVARCHAR2"
                                               autocomplete="off" lay-verify="required" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>JAVA类型
                                    </label>
                                    <div class="layui-input-inline">
                                        <select id="javaType" name="javaType" lay-verify="required"></select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>实体类字段
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="text" id="javaField" name="javaField" placeholder="例如: userName"
                                               autocomplete="off" lay-verify="required" class="layui-input">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>字典类型
                                    </label>
                                    <div class="layui-input-inline">
                                        <select id="dictType" name="dictType" lay-verify="required"></select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>显示类型
                                    </label>
                                    <div class="layui-input-inline">
                                        <select id="htmlType" name="htmlType" lay-verify="required"></select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>是否主键
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="isPk" value="1" title="是">
                                        <input type="radio" name="isPk" value="0" title="否" checked="">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>Dto/Vo字段
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="isDtoVo" value="1" title="是" checked="">
                                        <input type="radio" name="isDtoVo" value="0" title="否">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>是否必填
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="isRequired" value="1" title="是" checked="">
                                        <input type="radio" name="isRequired" value="0" title="否">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>表单字段
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="isForm" value="1" title="是" checked="">
                                        <input type="radio" name="isForm" value="0" title="否">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>列表字段
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="isList" value="1" title="是" checked="">
                                        <input type="radio" name="isList" value="0" title="否">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>查询字段
                                    </label>
                                    <div class="layui-input-inline">
                                        <input type="radio" name="isQuery" value="1" title="是">
                                        <input type="radio" name="isQuery" value="0" title="否" checked="">
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="required">*</span>查询方式
                                    </label>
                                    <div class="layui-input-inline">
                                        <select id="queryType" name="queryType" lay-verify="required"></select>
                                    </div>
                                </div>


                            </div>

                        </div>

                        <div class="form-footer-center" style="text-align:center;margin-top: 20px;">
                            <button type="button" class="button-sub"
                                    lay-submit lay-filter="addColumnInfo">提交
                            </button>
                            <button type="button" class="button-close" onclick="goBackPreviousPage()">返回</button>
                        </div>
                        <input type="text" th:value="*{tableId}" id="tableId" name="tableId" style="display: none">
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>